<%--
  Created by IntelliJ IDEA.
  User: zhli
  Date: 2020/4/9
  Time: 上午9:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>准考证</title>

    <script type="text/javascript">
        function printpage(){
            var newstr = document.getElementById("print").innerHTML;
            var oldstr = document.body.innerHTML;
            document.body.innerHTML = "<center>"+newstr+"</center>";
            window.print();
            document.body.innerHTML = oldstr;
            return false;
        }
    </script>

    <style type="text/css">
        table,tr,td{
            alignment: left;
        }
    </style>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
%>
<center>
    <div  id="print">
        <table border="1px" >
            <tr>
                <td>准考证号</td>
                <td>${examno}</td>
            </tr>
            <tr>
                <td>姓名</td>
                <td>${name}</td>
            </tr>
            <tr>
                <td>性别</td>
                <td>${sex}</td>
            </tr>
            <tr>
                <td>省份</td>
                <td>${province}</td>
            </tr>
            <tr>
                <td>报考学校</td>
                <td><a href="https://www.baidu.com/s?wd=${school}" target="_blank">${school}</a></td>
            </tr>
        </table>
    </div>
    <input type="button" value="打印" onclick="printpage();">

</center>

</body>
</html>
